:root{
    --error-color: #e74c3c;
    --success-color: #2ecc71;
}
*{
    box-sizing: border-box;
}

body{
    display: flex;
    /* flex-direction: column; */
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: aqua;
    margin: 0;
}

.joinUs{
    width: 400px;
    /* margin-top: 50px; */
    border: 2px solid #fff;
    box-shadow: 0 2px 10px rgb(0, 0, 0, 30%);
    border-radius: 5px;
}

h1 {
    text-align: center;
    margin: 0 0 20px;
}

.form{
    padding: 30px 40px;
}

.form-control{
    margin-bottom: 10px;
    padding-bottom: 20px;
    position: relative;
}

.form-control label{
    color: #777;
    display: block;
    margin-bottom: 5px;
}

.form-control input{
    display: block;
    border: 2px solid #f0f0f0;
    border-radius: 4px;
    width: 100%;
    padding: 10px;
    font-size: 14px;
}

/* 如果输入的input框出错/成功 */
.form-control .error input{
    border-color: var(--error-color);
}

.form-control .success input{
    border-color: var(--error-color);
}

/* 对错误信息隐藏 */
.form-control small{
    color: var(--error-color);
    position: absolute;
    left: 0;
    bottom: 0;
    visibility: hidden; 
}

/* 如果出错显示 */
.form-control.error small{
    visibility: visible;
}

.form button{
    cursor: pointer;
    background-color: #3498bd;
    border: 2px solid #3498bd;
    border-radius: 4px;
    width: 100%;
    margin-top: 20px;
    padding: 10px;
    font-size: 16px;
    color: #fff;
}